﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
using Abp.Application.Services.Dto;
using Abp.AutoMapper;
using Castle.MicroKernel.SubSystems.Conversion;

namespace OplugAbpProject.CMS.Dto
{
    [AutoMapFrom(typeof(Category))]
    public class CategoryTreeDto : EntityDto<long>
    {
        [Required, MaxLength(50)]
        public string CategoryName { get; set; }
        [Required, MaxLength(50)]
        public string CategoryIndex { get; set; }
        [Required, MaxLength(50)]
        public string Layout { get; set; }
        [Required, DefaultValue(0)]
        public int ParentId { get; set; }
        [Required, DefaultValue(0)]
        public int Childs { get; set; }
        [Required, DefaultValue(0)]
        public int Level { get; set; }
        [Required]
        public bool IsHide { get; set; }
        [MaxLength(50)]
        public string Icons { get; set; }
        public List<CategoryTreeDto> children { get; set; }
    }
}
